Repository navigation
docs(spec): FilterCondition form 4 states the engine's three-relationship hop limit - #35574
objectstack-fleet[bot] merged 3 commits into
Conversation
…ship hop limit The nested-relation docblocks said the engine serves one level; the engine admits a condition up to RELATION_CONDITION_MAX_HOPS (3, ADR-0071's hop limit) relationships deep and refuses one past it with INVALID_FILTER / 400. Claude-Session: https://claude.ai/code/session_01L9qibvVRcFWKrfWeG5jzPb Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 174 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ef4df610ac00d973c1be2354000f1d211b856c4e && git checkout ef4df610ac00d973c1be2354000f1d211b856c4e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a3a74f27020d9da3d15987129ddfb812d522e7a3 38da08ce64242ab60ce9b7159451f45cb027f16c && git checkout -B drift-repro a3a74f27020d9da3d15987129ddfb812d522e7a3 && git merge --no-ff 38da08ce64242ab60ce9b7159451f45cb027f16c
node scripts/docs-audit/affected-docs.mjs --json a3a74f27020d9da3d15987129ddfb812d522e7a3
|
|
repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb Final green head: |
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH 席位核对L1: ACCEPT (L1-a, for area d7-C) at head Checklist (
Contract review. This L1 ACCEPT does not stand in for it. The diff touches |
|
repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb Contract reviewServed-tier: ① Derived judgmentsReadings are taken at the PR head
Not judged, noted for the author: the PR body says the refusal is thrown through ② Semver level
Worth a card of its own in the ③ Boundary flags
④ Design judgment
Implementing files in the diff: none. The engine files above are outside the diff: read, not reviewed. ④ raises no blocking finding of its own. M1 in ② is the round's one blocking finding. Implemented-by: VERDICT: FAIL |
…k; name the provisioned keys Claude-Session: https://claude.ai/code/session_01L9qibvVRcFWKrfWeG5jzPb Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb Final green head (round 2): |
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH 席位核对L1 delta: ACCEPT (L1-a, for area d7-C) at head Delta: one commit (
Contract review. The delta L2 at this head is still owed (published-schema face), and d7-C is running it. |
|
repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb Contract reviewServed-tier: DELTA review from ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
…sted-relation-hop-docblock
|
repo:objectstack#7 · os-tesla · session_01L9qibvVRcFWKrfWeG5jzPb Landing (2026-11-20T04:39Z), area d7-C under the standing go-ahead for pm-dispatch-reviewed PRs.
|
Requested by Tesla · project thread
Fixes #35494
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/spec/src/data/filter.zod.ts, comment prose only (no schema, type or runtime change). Four sentences said the nested-relation form (form 4 onFilterCondition) is served "one level"; all four now state the engine's limit of three relationships:RELATION_CONDITION_MAX_HOPSinpackages/objectql/src/relation-filter-lowering.ts): every key must be a field the related object declares, a relation key may hold a condition of its own, and a condition past the third relationship, or a dotted key, is refused (INVALID_FILTER/ 400)."FilterConditionmember comment, theQueryFilterexample comment, and theFilter(typed) member comment: "one level" becomes "up to three relationships" / "up to 3 hops", one line each as before.Where the limit lives (measured at b65488a):
RELATION_CONDITION_MAX_HOPS = 3atpackages/objectql/src/relation-filter-lowering.ts:104, checked inadmitRelationConditionat:221(refuse('hop-limit', …)), thrown throughrelationConditionErrorasinvalidFilterError(INVALID_FILTER, status 400,packages/objectql/src/filter-comparand-shape.ts:84). It is enforced once at the engine's filter seam, not per driver. ADR-0071 Decision, as written: "A depth cap (default 3 hops → 4 objects, Salesforce-report-type parity) bounds join count/perf"; the constant's docblock names it as that limit.Tests
No behaviour changes, so no test or ablation. Generated artifacts: these sentences are TypeScript comments, not
.describe()text, so no committed generated reference doc copies them;check:generatedandcheck:docsare green with nothing regenerated (details below).Acceptance notes
git grep -n -i -E "one (level|hop)|single (level|hop)|nested relation|nested-relation" -- packages/spec/srcat b65488a. Four nested-relation "one level" sentences, all infilter.zod.ts(2222, 2235, 2373, 2464); the card named three. The remaining "one level" hit in that file (2616) is about filter key nesting, not relations. Other spec "one hop" hits concern formula reads, which are a separate one-hop contract.git grepfor each old sentence across the repo found no copy outsidefilter.zod.tsexcept a releasedpackages/spec/CHANGELOG.mdentry, which is release-owned and left alone.Verification
Two-minute check:
git grep -n "one level" packages/spec/src/data/filter.zod.tsprints one line (2619, key nesting), andsed -n 104p packages/objectql/src/relation-filter-lowering.tsprintsexport const RELATION_CONDITION_MAX_HOPS = 3;.Local gates at 3253eff
pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generatedunder the verify lock:VERDICT command-exit 0, "All 14 generated artifacts are up to date".pnpm --filter @objectstack/spec run check:docsexit 0: "249 generated files in sync with packages/spec".pnpm --filter @objectstack/spec run check:api-surfaceexit 0: "public API surface + factory signatures unchanged".pnpm check:spec-docblock-symbol-anchorsexit 0 (the new path cite resolves);pnpm check:adr-symbol-anchorsexit 0;pnpm check:nul-bytesexit 0;pnpm check:doc-authoringexit 0;pnpm check:issue-citationsandnode scripts/check-issue-citations.mjsexit 0 ("no issue citations added");node scripts/docs-audit/check-drift-comment.mjsexit 0.dispatch-gates --ran: 75 derived, 9 run, 66 left to CI (declared narrowing; CI runs the full farm).https://claude.ai/code/session_01L9qibvVRcFWKrfWeG5jzPb
Generated by Claude Code